﻿<local:DocumentBase x:Class="WPFExcelReport.JLTCOWS"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"                    
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:me="clr-namespace:WPFExcelReport"
                    xmlns:HR="clr-namespace:WPFExcelReport;assembly=THRSTAMM"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"                                        
                    Background="White"
                    Name="TV"
                    Loaded="Window_Loaded"
     >
    <local:DocumentBase.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <CollectionViewSource   x:Key="vwVKP" Source="{Binding Path=SetData.ICC_VKPRICE}" />
        <CollectionViewSource   x:Key="vwTVKP" Source="{Binding Path=SetProd.ICC_VKPRICE}" />
        <CollectionViewSource   x:Key="vwWARP" Source="{Binding Path=SetProd.ICC_VKPWARP}" />
        <CollectionViewSource   x:Key="vwWEFT" Source="{Binding Path=SetProd.ICC_VKPWEFT}" />
    </local:DocumentBase.Resources>
    <TabControl>
        <TabItem Header="{Binding Source={Localization:TranslateExtension Word=浏览}}" Background="White">
            <Grid   >
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="1*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="2*"/>
                    <ColumnDefinition Width="1*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.Row="0" Grid.Column="0" >
                    <WrapPanel>
                        <TextBlock VerticalAlignment="Center" FontSize="18" Text="{Binding Source={Localization:Translate Word=大货/试样}}"></TextBlock>
                        <CheckBox Name="ChkS" IsChecked="False" VerticalAlignment="Center"  Visibility="Hidden"
                          Background="White"
                          >
                            <CheckBox.LayoutTransform>
                                <ScaleTransform ScaleX="2" ScaleY="2" />
                            </CheckBox.LayoutTransform>
                        </CheckBox>
                        <TextBlock VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=勾选为S样}}"  Visibility="Hidden"></TextBlock>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0"  Margin="20,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center"  FontSize="18"  Text="月份"></TextBlock>
                            <TextBox Grid.Column="1"  Margin="20,0,0,0"  Text="{Binding LMONTH}"  CharacterCasing="Upper"  Width="80"  ></TextBox>
                            <TextBlock Visibility="Collapsed" Grid.Column="2"  Margin="20,0,0,0" HorizontalAlignment="Center"  FontSize="18"  Text="日期"></TextBlock>
                            <TextBox Visibility="Collapsed"  Grid.Column="3"  Margin="20,0,0,0"  Text="{Binding DATES}"  CharacterCasing="Upper"  Width="80"  ></TextBox>
                            <TextBox Visibility="Collapsed"  Grid.Column="4"  Margin="20,0,0,0"   Text="{Binding DATET}" CharacterCasing="Upper"  Width="80" ></TextBox>
                        </Grid>
                        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" Text="{Binding Source={Localization:TranslateExtension Word=刷新}}"></TextBlock>
                        <Button Margin="5,0,0,0" Width="20" Height="20"  Click="cmdRefresh_Click">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Refresh.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" Text="{Binding Source={Localization:TranslateExtension Word=品种}}"></TextBlock>
                        <TextBox Background="Yellow"  FontSize="18"    Width="120" Name="txtART" CharacterCasing="Upper" Margin="10,0,0,0" Text="" />
                        <Button Margin="0,0,0,0"  Width="20" Height="20" Click="btnQuery_Click">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Search.png" />
                            </Button.Background>
                        </Button>
                        <Button Name="cRep" Margin="0,0,0,0"  Width="20" Height="20" Click="btnReparie_Click" Visibility="Visible" >
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Add.png" />
                            </Button.Background>
                        </Button>
                        <Button Margin="2,0,0,0" Content="{Binding Source={Localization:TranslateExtension Word=编辑}}" FontSize="18"  Click="cmdVKPEDIT_Click"></Button>
                        <Button Width="Auto" Margin="20,0,0,0" FontSize="18" HorizontalAlignment="Left"  Click="btnFilter_Click" Content="{Binding Source={Localization:TranslateExtension Word=过滤}}"></Button>
                        <Button Width="Auto"  Margin="20,0,0,0"  FontSize="18" HorizontalAlignment="Left"  Click="btnFilterClear_Click" Content="{Binding Source={Localization:TranslateExtension Word=清除}}"></Button>
                         
                        <Button FontSize="18" Height="30" Width="30" Margin="5,0,0,0"  Click="btnPrintList_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Print.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Margin="5,0,0,0"  Text="{Binding Source={Localization:TranslateExtension Word=打印}}" VerticalAlignment="Center" ></TextBlock>
                    </WrapPanel>
                    <WrapPanel >
                        <TextBlock Text="创建:"></TextBlock>
                        <HR:TSHR20 BENID="{Binding NEWUSER,Source={StaticResource ResourceKey=vwVKP}}" MinWidth="60"  MinHeight="20"></HR:TSHR20>
                        <TextBlock Text="修改:"></TextBlock>
                        <HR:TSHR20 BENID="{Binding CHGUSER,Source={StaticResource ResourceKey=vwVKP}}" MinWidth="60"  MinHeight="20"></HR:TSHR20>
                    </WrapPanel>
                </StackPanel>
                <DataGrid  Grid.Row="1" VerticalAlignment="Top"  Grid.Column="0"
                AutoGenerateColumns="False"
                EnableRowVirtualization="False"
                VerticalScrollBarVisibility="Auto"
                HorizontalScrollBarVisibility="Auto"
                HeadersVisibility="Column"                 
                HorizontalAlignment="Stretch"               
                ItemsSource="{Binding Source={StaticResource ResourceKey=vwVKP}}"  
                x:Name="dlgVKPRICE" 
                Margin="0,1,0,0"             
                RowDetailsVisibilityMode="Visible"
                    >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=VKPAUFKRS, Converter={StaticResource ResourceKey=Trim}}" Header=""  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VKPAUFLFD, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=销售单}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VKPART, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=品种}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VAABEZ, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:TranslateExtension Word=名称}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VKPQTY, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=数量}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VKPUNIT, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=单位}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=MVKCOST}" Header="{Binding Source={Localization:TranslateExtension Word=小计}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=MCOSTGROSS}" Header="{Binding Source={Localization:TranslateExtension Word=毛公交}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=MCOSTNET}" Header="{Binding Source={Localization:TranslateExtension Word=净公交}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=MCOSTNETW}" Header="{Binding Source={Localization:TranslateExtension Word=万纬净公交}}"  Width="Auto" />
                        <!--DataGridTextColumn Binding="{Binding Path=MCOSTMY, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=原料价格}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=MCOSTDY, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=染色费}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=MCOSTPROD, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=生产费用}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=MCOSTPROD, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=加工费}}"  Width="Auto" /-->
                        <DataGridTextColumn Binding="{Binding Path=NEWUSER, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=创建者}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=NEWTIME, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=创建日期}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=CHGUSER, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=修改者}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=CHGTIME, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=修改日期}}"  Width="Auto" />
                    </DataGrid.Columns>
                </DataGrid  >
                <StackPanel Grid.Row="1" Grid.Column="1">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="80"></ColumnDefinition>
                            <ColumnDefinition Width="200"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=规格}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=CONSTRUCTION, Converter={StaticResource ResourceKey=gb2312},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                    </Grid>
                    <WrapPanel>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="80"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=原料费}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTMY, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="80"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=染色费}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTDY, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="80"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=加工费}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTPROD, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                        </Grid>                       
                    </WrapPanel>
                    <WrapPanel >
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="80"></ColumnDefinition>
                                <ColumnDefinition Width="60"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=整理}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTFIN, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="80"></ColumnDefinition>
                                <ColumnDefinition Width="60"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=包装费}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTPAK, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"  ></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="80"></ColumnDefinition>
                                <ColumnDefinition Width="60"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=运费}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTFVV, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" ></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="80"></ColumnDefinition>
                                <ColumnDefinition Width="60"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=其他}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTADD, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="80"></ColumnDefinition>
                                <ColumnDefinition Width="60"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=生产费用}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTPROD, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" ></TextBlock>
                        </Grid>
                    </WrapPanel>
                    <DataGrid  VerticalAlignment="Top" 
                               AutoGenerateColumns="False"
                               EnableRowVirtualization="False"
                               VerticalScrollBarVisibility="Auto"
                               HorizontalScrollBarVisibility="Auto"
                               HeadersVisibility="Column" 
                               Height="100"            
                               IsReadOnly="False"
                               HorizontalAlignment="Stretch"     
                               ItemsSource="{Binding Source={StaticResource ResourceKey=vwWARP}}"  
                               Margin="0,1,0,0"             
                    >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=MYARN, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:TranslateExtension Word=纱线}}"  Width="150" />
                            <DataGridTextColumn Binding="{Binding Path=MUSAGE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=用量}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MUNIT, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=单位}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MPRICEM, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=价格}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MVALUEM, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=价值}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MPRICED, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=染色}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MVALUED, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=加工费}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MCOST, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=成本}}"  Width="Auto" />
                        </DataGrid.Columns>
                    </DataGrid  >
                    <DataGrid  VerticalAlignment="Top" 
                                        AutoGenerateColumns="False"
                                        EnableRowVirtualization="False"
                                        VerticalScrollBarVisibility="Auto"
                                        HorizontalScrollBarVisibility="Auto"
                                        HeadersVisibility="Column" 
                                        Height="100"
                                        IsReadOnly="False"
                                        HorizontalAlignment="Stretch"     
                                        ItemsSource="{Binding Source={StaticResource ResourceKey=vwWEFT}}"  
                                        Margin="0,1,0,0"             
                    >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=MYARN, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=纱线}}"  Width="100" />
                            <DataGridTextColumn Binding="{Binding Path=MUSAGE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=用量}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MUNIT, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=单位}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MPRICEM, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=价格}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MVALUEM, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=价值}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MPRICED, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=染色}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MVALUED, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=加工费}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MCOST, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=成本}}"  Width="Auto" />
                        </DataGrid.Columns>
                    </DataGrid  >
                    <WrapPanel >
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=原料小计}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTMY, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" Background="AliceBlue"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition> 
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=染色费小计}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTDY, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" Background="AliceBlue"></TextBlock>
                        </Grid>
                    </WrapPanel>
                </StackPanel>
            </Grid>
        </TabItem>
        <TabItem Name="detail" Header="{Binding Source={Localization:TranslateExtension Word=明细}}" Background="White">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                    <WrapPanel>
                        <Button Margin="0,0,0,0"  Width="40" Height="40" Click="cmdReset_Click">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Reload.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Text="{Binding Source={Localization:TranslateExtension Word=重置}}" VerticalAlignment="Center"></TextBlock>

                        <Button Margin="0,0,0,0"  Width="40" Height="40" Click="Save_Click">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Save.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Text="{Binding Source={Localization:TranslateExtension Word=保存}}" VerticalAlignment="Center"></TextBlock>
                        <Button FontSize="18" Height="30" Width="30" Margin="5,0,0,0" Name="btnPrint" Click="btnPrint_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Print.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Margin="5,0,0,0"  Text="{Binding Source={Localization:TranslateExtension Word=打印}}" VerticalAlignment="Center" ></TextBlock>
                    </WrapPanel>

                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="2*"></ColumnDefinition>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <StackPanel Grid.Column="0">
                            <StackPanel>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=产品}}"></TextBlock>
                                    <WrapPanel  Grid.Column="1" >
                                    <TextBlock Text="{Binding Path=VKPART, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                    <TextBlock Margin="30,0,0,0" Grid.Column="1" Text="{Binding Path=VAABEZ, Converter={StaticResource ResourceKey=gb2312},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                    </WrapPanel>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="300"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=规格}}"></TextBlock>
                                    <TextBlock Grid.Column="1" Text="{Binding Path=CONSTRUCTION, Converter={StaticResource ResourceKey=gb2312},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                </Grid>

                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="100"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=原料费}}"></TextBlock>
                                    <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTMY, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="100"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=染色费}}"></TextBlock>
                                    <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTDY, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="100"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=加工费}}"></TextBlock>
                                    <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTPROD, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="60"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=纬密}}"></TextBlock>
                                    <TextBox Grid.Column="1" Text="{Binding Path=MVKWEFTDEN,Source={StaticResource ResourceKey=vwTVKP}}" BorderBrush="Blue" Background="White"></TextBox>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <WrapPanel>
                                        <TextBlock Width="Auto" Text="{Binding Source={Localization:TranslateExtension Word=合同价}}"></TextBlock>
                                        <TextBlock Margin="30,0,0,0" Text="{Binding Path=MCPRICE, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" ></TextBlock>
                                        <TextBlock Margin="30,0,0,0" Text="{Binding Path=CURRENCY, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                        <TextBlock  Text="/"></TextBlock>
                                        <TextBlock  Text="{Binding Path=PREH, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                    </WrapPanel>
                                </Grid>
                                <WrapPanel>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="80"></ColumnDefinition>
                                            <ColumnDefinition Width="60"></ColumnDefinition>
                                            <ColumnDefinition Width="60"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=创建}}"></TextBlock>
                                        <TextBlock Grid.Column="1" Text="{Binding Path=NEWUSER,Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                        <TextBlock Grid.Column="2" Text="{Binding Path=NEWTIME,Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                    </Grid>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="80"></ColumnDefinition>
                                            <ColumnDefinition Width="60"></ColumnDefinition>
                                            <ColumnDefinition Width="60"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=更改}}"></TextBlock>
                                        <TextBlock Grid.Column="1" Text="{Binding Path=CHGUSER,Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                        <TextBlock Grid.Column="2" Text="{Binding Path=CHGTIME,Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                    </Grid>
                                </WrapPanel>
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Grid.Column="1">
                            <StackPanel >
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="60"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=元/米}}"></TextBlock>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=整理}}"></TextBlock>
                                    <TextBox Grid.Column="1" Text="{Binding Path=MCOSTFIN, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" BorderBrush="Blue" Background="White"></TextBox>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="60"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=元/米}}"></TextBlock>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=包装费}}"></TextBlock>
                                    <TextBox Grid.Column="1" Text="{Binding Path=MCOSTPAK, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" BorderBrush="Blue" Background="White"></TextBox>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="60"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=元/米}}"></TextBlock>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=运费}}"></TextBlock>
                                    <TextBox Grid.Column="1" Text="{Binding Path=MCOSTFVV, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" BorderBrush="Blue" Background="White"></TextBox>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="60"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=元/米}}"></TextBlock>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=其他}}"></TextBlock>
                                    <TextBox Grid.Column="1" Text="{Binding Path=MCOSTFADD, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" BorderBrush="Blue" Background="White"></TextBox>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="60"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=元/米}}"></TextBlock>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=生产费用}}"></TextBlock>
                                    <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTPROD, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"></TextBlock>
                                </Grid>
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Grid.Column="2">
                            <StackPanel > 
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=佣金}}"></TextBlock>
                                    <TextBox Grid.Column="1" Text="{Binding Path=MPRICEAGENT,Source={StaticResource ResourceKey=vwTVKP}}" BorderBrush="Blue" Background="White"></TextBox>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=美分/米}}"></TextBlock>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=海运费}}"></TextBlock>
                                    <TextBox Grid.Column="1" Text="{Binding Path=MPRICESHIP,Source={StaticResource ResourceKey=vwTVKP}}" BorderBrush="Blue" Background="White"></TextBox>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=美分/米}}"></TextBlock>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=客户空运}}"></TextBlock>
                                    <TextBox Grid.Column="1" Text="{Binding Path=MPRICEFLIGHT,Source={StaticResource ResourceKey=vwTVKP}}" BorderBrush="Blue" Background="White"></TextBox>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=元/米}}"></TextBlock>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=其他}}"></TextBlock>
                                    <TextBox Grid.Column="1" Text="{Binding Path=MCOSTADD,Source={StaticResource ResourceKey=vwTVKP}}" BorderBrush="Blue" Background="White"></TextBox>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=元/米}}"></TextBlock>
                                </Grid>
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Grid.Column="3">
                            <StackPanel >
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="60"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=元/米}}"></TextBlock>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=毛工交}}" ></TextBlock>
                                    <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTGROSS, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" ></TextBlock>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="60"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=元/米}}"></TextBlock>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=净工交}}" ></TextBlock>
                                    <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTNET, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}"  ></TextBlock>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="60"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=元/米}}"></TextBlock>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=万纬净工交}}"></TextBlock>
                                    <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTNETW, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" ></TextBlock>
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="60"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=汇率}}"></TextBlock>
                                    <TextBlock Grid.Column="1" Text="{Binding Path=USD2RMB, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" Background="White" /> 
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"></ColumnDefinition>
                                        <ColumnDefinition Width="200"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=目的地}}"></TextBlock>
                                    <TextBox Grid.Column="1" Text="{Binding Path=REMARK, Converter={StaticResource ResourceKey=gb2312},Source={StaticResource ResourceKey=vwTVKP}}" BorderBrush="Blue" Background="White"></TextBox>
                                </Grid>
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                </StackPanel>
                <StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="1*"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <DataGrid  Grid.Row="0"  Grid.Column="0" VerticalAlignment="Top" 
                               AutoGenerateColumns="False"
                               EnableRowVirtualization="False"
                               VerticalScrollBarVisibility="Auto"
                               HorizontalScrollBarVisibility="Auto"
                               HeadersVisibility="Column" 
                               Height="200"            
                               IsReadOnly="False"
                               HorizontalAlignment="Stretch"     
                               ItemsSource="{Binding Source={StaticResource ResourceKey=vwWARP}}"  
                               Margin="0,1,0,0"             
                    >
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding Path=MYARN, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:TranslateExtension Word=纱线}}"  Width="100" />
                                <DataGridTextColumn Binding="{Binding Path=MUSAGE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=用量}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MUNIT, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=单位}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MPRICEM, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=价格}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MVALUEM, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=价值}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MPRICED, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=染色}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MVALUED, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=加工费}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MCOST, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=成本}}"  Width="Auto" />
                            </DataGrid.Columns>
                        </DataGrid  >
                        <DataGrid  Grid.Row="0"  Grid.Column="1" VerticalAlignment="Top" 
                AutoGenerateColumns="False"
                EnableRowVirtualization="False"
                VerticalScrollBarVisibility="Auto"
                HorizontalScrollBarVisibility="Auto"
                HeadersVisibility="Column" 
                Height="200"
                IsReadOnly="False"
                HorizontalAlignment="Stretch"     
                ItemsSource="{Binding Source={StaticResource ResourceKey=vwWEFT}}"  
                Margin="0,1,0,0"             
                    >
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding Path=MYARN, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:TranslateExtension Word=纱线}}"  Width="100" />
                                <DataGridTextColumn Binding="{Binding Path=MUSAGE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=用量}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MUNIT, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=单位}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MPRICEM, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=价格}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MVALUEM, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=价值}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MPRICED, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=染色}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MVALUED, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=加工费}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=MCOST, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=成本}}"  Width="Auto" />
                            </DataGrid.Columns>
                        </DataGrid  >
                        <WrapPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="100"></ColumnDefinition>
                                    <ColumnDefinition Width="80"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=原料小计}}"></TextBlock>
                                <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTMY, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" Background="AliceBlue"></TextBlock>
                            </Grid>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="100"></ColumnDefinition>
                                    <ColumnDefinition Width="80"></ColumnDefinition>
                                    <ColumnDefinition Width="100"></ColumnDefinition>
                                    <ColumnDefinition Width="80"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=染色费小计}}"></TextBlock>
                                <TextBlock Grid.Column="1" Text="{Binding Path=MCOSTDY, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwTVKP}}" Background="AliceBlue"></TextBlock>
                                <TextBlock Grid.Column="2" Text="{Binding Source={Localization:TranslateExtension Word=放大系数}}"></TextBlock>
                                <TextBlock Grid.Column="3" Name="txtRatio" ></TextBlock>
                            </Grid>
                        </WrapPanel>
                        <WrapPanel Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2">
                            <Button Width="Auto" HorizontalAlignment="Left"  Click="btnInsertWarp_Click" Content="{Binding Source={Localization:TranslateExtension Word=增加经纱}}" Margin="10,0,0,0"  ></Button>
                            <Button Width="Auto"  HorizontalAlignment="Left"  Click="btnDeleteWarp_Click" Content="{Binding Source={Localization:TranslateExtension Word=删除经纱}}" Margin="10,0,0,0"  ></Button>
                            <Button Width="Auto"  HorizontalAlignment="Left"  Click="btnInsertWeft_Click" Content="{Binding Source={Localization:TranslateExtension Word=增加纬纱}}" Margin="10,0,0,0"  ></Button>
                            <Button Width="Auto"  HorizontalAlignment="Left"  Click="btnDeleteWeft_Click" Content="{Binding Source={Localization:TranslateExtension Word=删除纬纱}}" Margin="10,0,0,0"  ></Button>
                        </WrapPanel>
                    </Grid>
                </StackPanel>
            </Grid>
        </TabItem>
        <TabItem   Header="{Binding Source={Localization:TranslateExtension Word=管理}}" Background="White">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="1*"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <me:COWSEDIT Grid.Row="0" Grid.Column="0"></me:COWSEDIT>
            </Grid>           
        </TabItem>
    </TabControl>
</local:DocumentBase>